<?php


define('IN_ECS', true);
// error_reporting(0);
// ini_set("display_errors",0);//不在页面显示错误信息
//$echoStr = $_GET["echostr"];

//echo $echoStr;
//exit;

require(dirname(__FILE__) . '/../includes/init.php');
require('callback-ent.php');
$wechatObj = new wechatCallbackapi();
$ecdb -> prefix = $ecs -> prefix;
$wechatObj -> valid($db,$ecdb);

$base_url = 'http://' . $_SERVER['SERVER_NAME'] . '/chunle/';
$base_url = 'http://g4.shfyuan.com/chunle/';
$db -> prefix = $ecs -> prefix;

if($_GET['test'] ==1)
{
	
	$re = $wechatObj -> getUserInfo($db,"osWlduD7V_Vp776_M8Q6kZ0zCXHg");
	
	echo $re->nickname;
}
else
{
	$wechatObj -> responseMsg($db, $user, $base_url);
}
// test
?>